package com.dxf.redis.pubsub;



import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import redis.clients.jedis.JedisPubSub;

public class CustomJedisPubSub  extends JedisPubSub {

    private static final Logger log = LoggerFactory.getLogger(CustomJedisPubSub.class);
    @Override
    public void onMessage(String channel, String message) {

        log.debug("onMessage 方法中channel:{},message消息:{}",channel,message);

    }

    @Override
    public void onPMessage(String pattern, String channel, String message) {
        log.debug("onPMessage 方法中channel:{},message消息:{}",channel,message);
    }

    @Override
    public void onSubscribe(String channel, int subscribedChannels) {
        log.debug("这是订阅信息,订阅channel:{},subscribedChannels值:{}",channel,subscribedChannels);
    }

    @Override
    public void onUnsubscribe(String channel, int subscribedChannels) {
        super.onUnsubscribe(channel, subscribedChannels);
    }

    @Override
    public void onPUnsubscribe(String pattern, int subscribedChannels) {
        super.onPUnsubscribe(pattern, subscribedChannels);
    }

    @Override
    public void onPSubscribe(String pattern, int subscribedChannels) {
        super.onPSubscribe(pattern, subscribedChannels);
    }

    @Override
    public void onPong(String pattern) {
        super.onPong(pattern);
    }
}
